# 整数序列求和。用户输入一个正整数N，计算从1到N相加后的结果

def sum(N):
    result = 0
    for i in range(N+1):
        result += i
    return result

def printSum(N):
    for i in range(1, N):
        print("{} + ".format(i),end="")
    print("{} = {}".format(N,sum(N)))

# main:
N = eval(input("请输入正整数N:"))
printSum(N)
